#!/bin/sh
# Usage:
# bash scp.sh [DIRNAME] [AIMDIR]

scpdir=$1
shift
ipfile="ip.txt"
# edit user
user=root
aimdir=$2

cat $ipfile | while read ip; do
    scp -r $scpdir $user@$ip:$aimdir
done
